package com.huazhi.wzsnw.service.impl;

import com.huazhi.wzsnw.mapper.RoleMenuMapper;
import com.huazhi.wzsnw.model.RoleMenu;
import com.huazhi.wzsnw.service.RoleMenuService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RoleMenuServiceImpl implements RoleMenuService {
    @Autowired
    private RoleMenuMapper roleMenuMapper;

    @Override
    public int save(RoleMenu record) {
        return roleMenuMapper.insertSelective(record);
    }

    @Override
    public int delete(RoleMenu record) {
        roleMenuMapper.deleteByPrimaryKey(record.getTid());
        return 0;
    }

    @Override
    public int deletes(List<RoleMenu> records) {
        return 0;
    }

    @Override
    public int update(RoleMenu record) {
        return 0;
    }

    @Override
    public RoleMenu findByTid(String tid) {
        return null;
    }

    @Override
    public List<RoleMenu> findPagingByListTid(List<String> stringList, Integer pageIndex, Integer pageSize) {
        return null;
    }

    @Override
    public List<String> getMenuTidByRoleTid(String roletid) {
        return roleMenuMapper.selectMenuTidByRoleTid(roletid);
    }

    @Override
    public List<RoleMenu> getRoleMenuByRoleTid(String roletid) {
        return roleMenuMapper.selectRoleMenuByRoleTid(roletid);
    }
}
